#:import UIMix ui.base.UIMix
#:import ImageButton ui.base.button
#:import MusicSlider ui.base.slider

<MyMsYhLabel@Label>:
    color: UIMix.label_color

<MyMsYhButton@Button>:
    size_hint: 0.22, 1
    font_size: UIMix.PlayRow.font_size1

<PlayRow>:
    orientation: 'vertical'
    canvas.before:
        Color:
            rgba: 0, 0, 0, 1
        Rectangle:
            pos:self.pos
            size:self.size
    padding: 20
    size_hint: 1, None
    height: 200

    BoxLayout:
        size_hint:1, None
        height: 40
        padding: 8, 8, 0, 0
        spacing: 20
        BoxLayout:
            size_hint: None, 1
            width: self.minimum_width
            spacing: 20
            Image:
                id: id_state_icon
                size_hint:None, None
                size: 30, 30
                pos_hint:{'center_y':.5}
                source: root.x_icon
            MyMsYhButton:
                id: id_button_dropdown
                size_hint:None, 1
                width: 100
                font_size: UIMix.PlayRow.font_size2

        Label:
            id: id_file_name_text
            text: '音频文件名称'
            valign: 'center'

        BoxLayout:
            size_hint: 0.18, 1
            ImageButton:
                id: id_sound_volume
                size_hint:None, None
                size: 32, 28
                source: root.sound_volume_icon
                on_release: root.on_release_sound_volume()
            MusicSlider:
                id: id_sound_volume_slider
                value: 100
                value_track_color: root.sound_volume_slider_track_color


    BoxLayout:
        size_hint: 1, None
        height: 60
        MusicSlider:
            id: id_play_slider

    BoxLayout:
        size_hint: 1, None
        height: 50
        BoxLayout:
            size_hint: 0.35, None
            height: 40
            pos_hint: {'center_y': 0.5}
            spacing: 10
            MyMsYhButton:
                size_hint: None, 1
                width: 90
                text: '清除音频'
                on_release: root.clear_audio()
            MyMsYhButton:
                size_hint: None, 1
                width: 90
                text: '添加音频'
                on_release: root.add_audio()
            Widget

        BoxLayout:
            size_hint: 0.45, 1
            spacing: 14
            ImageButton:
                source: root.replay_icon
                on_release: root.on_replay()
            ImageButton:
                source: root.fast_rewind_icon
                on_release: root.on_fast_rewind()
            ImageButton:
                id: id_pause_or_proceed_button
                source: root.play_icon
                on_release: root.on_pause_or_proceed()
            ImageButton:
                source: root.fast_forward_icon
                on_release: root.on_fast_forward()
            Image:
                id: id_red_play
                size_hint: None, None
                size: self.texture_size
                pos_hint:{'center_y':.5}
                source: root.red_play_icon
                opacity: 1 if root.track_type == 'primary' else 0

            MyMsYhLabel:
                size_hint: None, 1
                width: 220
                id: id_music_length_text
            Widget:

        BoxLayout:
            size_hint: 0.2, 1
            MyMsYhLabel:
                text: 'START-UP ' + root.text_current_music_play_time
                halign: 'left'
            BoxLayout:
                size_hint: 0.2, 1

    BoxLayout:
